package cn.huiyunche.base.service.form;

import cn.huiyunche.base.service.constant.RegularConstant;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by houjianhui on 2017/3/23.
 */
public class BCompanyUserForm {

    private Long id;

    private Long userId;

    @NotBlank(message = "用户登录名称不能为空")
    @Pattern(regexp = RegularConstant.ACCOUNT_RULES, message = "登录名只能输入数字、字母、_")
    private String name;

    private String realName;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegularConstant.NUMBER, message = "手机号只能输入数字")
    @Length(max = 11, min = 11, message = "手机号长度只能为11位数字")
    private String phone;
    private String enable;
    private Integer userType;
    private Integer userStatus;
    private String email;

    @NotNull(message = "部门不能为空")
    private Integer divisionId;

    private Long companyId;

    private Long companyCode;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEnable() {
        return enable;
    }

    public void setEnable(String enable) {
        this.enable = enable;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getDivisionId() {
        return divisionId;
    }

    public void setDivisionId(Integer divisionId) {
        this.divisionId = divisionId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(Long companyCode) {
        this.companyCode = companyCode;
    }

    @Override
    public String toString() {
        return "BCompanyUserForm{" +
                "id=" + id +
                ", userId=" + userId +
                ", name='" + name + '\'' +
                ", realName='" + realName + '\'' +
                ", phone='" + phone + '\'' +
                ", enable='" + enable + '\'' +
                ", userType=" + userType +
                ", userStatus=" + userStatus +
                ", email='" + email + '\'' +
                ", divisionId=" + divisionId +
                ", companyId=" + companyId +
                ", companyCode='" + companyCode + '\'' +
                '}';
    }
}
